Options to enable configuring install for lower idle CPU.#160
Open
naturedamends wants to merge 6 commits intoDokploy:mainfrom
Open
Options to enable configuring install for lower idle CPU.#160naturedamends wants to merge 6 commits intoDokploy:mainfrom
naturedamends wants to merge 6 commits intoDokploy:mainfrom
Conversation
Comment on lines
+278
to
+286
| if [ "$HEALTH_CMD" = "none" ]; then | ||
| HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --no-healthcheck" | ||
| elif [ -n "$HEALTH_CMD" ]; then | ||
| HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-cmd $HEALTH_CMD" | ||
| fi | ||
| [ -n "$HEALTH_INTERVAL" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-interval $HEALTH_INTERVAL" | ||
| [ -n "$HEALTH_TIMEOUT" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-timeout $HEALTH_TIMEOUT" | ||
| [ -n "$HEALTH_RETRIES" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-retries $HEALTH_RETRIES" | ||
| [ -n "$HEALTH_START_PERIOD" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-start-period $HEALTH_START_PERIOD" |
There was a problem hiding this comment.
--no-healthcheck combined with health timing flags causes a Docker error
When HEALTH_CMD=none is set alongside any timing variable (e.g. HEALTH_INTERVAL=30s), the resulting flags are --no-healthcheck --health-interval 30s. Docker rejects this combination — --no-healthcheck and --health-* options are mutually exclusive. The health timing checks on lines 283-286 run unconditionally, so the conflict can arise silently from a plausible user configuration.
Add a guard so timing options are only appended when HEALTH_CMD is not "none":
HEALTH_EXTRA_OPTS=""
if [ "$HEALTH_CMD" = "none" ]; then
HEALTH_EXTRA_OPTS="--no-healthcheck"
else
if [ -n "$HEALTH_CMD" ]; then
HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-cmd $HEALTH_CMD"
fi
[ -n "$HEALTH_INTERVAL" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-interval $HEALTH_INTERVAL"
[ -n "$HEALTH_TIMEOUT" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-timeout $HEALTH_TIMEOUT"
[ -n "$HEALTH_RETRIES" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-retries $HEALTH_RETRIES"
[ -n "$HEALTH_START_PERIOD" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-start-period $HEALTH_START_PERIOD"
fi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am trying to reduce idle CPU usage. Dokpoly is using 2 percent ish on my low powered device.
I would like an option to remove redis, and postgres,, but postgres ..
I'm not bothered about delth checks
this allows keeping them, turning them off, and configuring the values
Greptile Summary
This PR adds two install-time options to reduce idle CPU: a
REDIS_HZenv var to lower the Redis polling frequency, and a family ofHEALTH_*env vars (HEALTH_CMD=nonebeing the primary advertised use case) to configure or disable Docker health checks on the dokploy service.HEALTH_CMD=nonecombined with anyHEALTH_INTERVAL/HEALTH_TIMEOUT/HEALTH_RETRIES/HEALTH_START_PERIODvariable will produce--no-healthcheck --health-interval …, which Docker rejects; the timing checks need to be gated onHEALTH_CMD != "none".Confidence Score: 4/5
Safe to merge once the --no-healthcheck / health-timing conflict is resolved.
One P1 defect: Docker rejects --no-healthcheck alongside --health-interval/--health-timeout/etc., which can occur with a plausible user configuration. The P2 (unconditional redis-server command) is low-risk given Redis 7's default CMD, and the fix is straightforward.
apps/website/public/install.sh — specifically the HEALTH_EXTRA_OPTS construction block (lines 277–286) and the redis_args initialization (line 253).
Comments Outside Diff (1)
apps/website/public/install.sh, line 310 (link)$HEALTH_EXTRA_OPTSis applied to the Traefikdocker runcall here in addition to thedocker service createfor dokploy. If the intent is only to reduce CPU for the dokploy container, Traefik's health checks are being altered as a side-effect. If both are intentional, consider documenting this behaviour so future readers know it's by design.Reviews (2): Last reviewed commit: "Add no args redis command." | Re-trigger Greptile